from PyQt5.Qt import *
import sys
class Window(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("")
        self.resize(600,400)
        lb1 = QLabel(self)
        lb1.resize(200,200)
        lb1.move(50,50)
        lb1.setStyleSheet("""
        background-color:red;
        """)

        lb2 = QLabel(self)
        lb2.resize(200, 200)
        lb2.move(100, 100)
        lb2.setStyleSheet("""
             background-color:green;
             """)
        lb3 = QLabel(self)
        lb3.resize(200, 200)
        lb3.move(150, 150)
        lb3.setStyleSheet("""
               background-color:blue;
               """)
        # lb1.raise_()  # 最上面
        # lb1.lower()    #最下面
        lb2.stackUnder(lb1)  # lb2 放在lb1 的下面

if __name__=='__main__':
    app = QApplication(sys.argv)
    w = Window()
    w.show()
    sys.exit(app.exec_())